#!/bin/bash
#功能函数
funcs=./functions.sh
if test ! -f $funcs; then
    funcs=`which functions.sh`
    if [ "$funcs" = "" ]; then
        echo "functions.sh not exist!!"
        return
    else
        echo "funcs=$funcs"
	. $funcs
    fi
else
    echo "funcs=$funcs"
    . $funcs  
fi


function help()
{
echoTextGreen "
http://127.0.0.1/phpmyadmin/index.php
mysql   
用户 root    密码 mohuifu
用户 mohuifu 密码 3rXA2TvcuwrjxrUt
用户名  	admin
密码 	0ojZs19w7c21"
echoTextBlue "
http://127.0.0.1/wp-admin/index.php"

mediawiki信息：
邮件: mohuifu@gmail.com
用户名: mohuifu 密码: moxxming
设置向导:
http://127.0.0.1/mediawiki/config/index.php
向导指南:
http://vaqeteart.iteye.com/blog/616999
mediawiki创建分类
http://www.mediawiki.org/wiki/Help:Categories/zh


}
function login()
{
menu_list="
http://127.0.0.1/phpmyadmin/index.php
http://127.0.0.1/wp-admin/index.php
"
echoTextBlue "Please select"
result=`sh_menu_select "$menu_list"`
echo "${result}"
${result}
}


#脚步入口：解析参数
while test $# != 0
do
    case $1 in
	-r)
	    shift
	    version=$1
	    ;;
	-m)
	    shift
	    mode=$1
	    ;;
        *)
	    mode=$1
	    ;;
       esac
       shift
done


if [ "$mode" == "help" ]; then
  xampp_help
elif [ "$mode" == "auto" ]; then
  echo "auto"
  setup-xampp.sh
  setup-trac.sh
else
    xampp_help
    menu_list="
setup-xampp.sh
/usr/local/bin/setup/setup-wiki.sh
help
"
    echoTextBlue "Please select"
    result=`sh_menu_select "$menu_list"`
    echo "${result}"
    ${result}
fi
